#ifndef OGREWIDGET_H
#define OGREWIDGET_H

#include <QWidget>
#include "ui_ogrewidget.h"
#include "Ogre3DEngine.h"

class OgreWidget : public QWidget, public Ogre::FrameListener
{
	Q_OBJECT

public:
	OgreWidget(QWidget *parent = 0);
	~OgreWidget();

private:
	Ui::OgreWidget ui;

protected:
	virtual QPaintEngine *	paintEngine () const;
	
	virtual void moveEvent(QMoveEvent *e);
    virtual void paintEvent(QPaintEvent *e);
    virtual void resizeEvent(QResizeEvent *e);
    virtual void showEvent(QShowEvent *e);

	// input functions
	virtual void keyPressEvent(QKeyEvent *e);
	virtual void keyReleaseEvent(QKeyEvent* e); 
	void mousePressEvent(QMouseEvent *e);
	void mouseReleaseEvent(QMouseEvent *);
	void mouseMoveEvent(QMouseEvent *e);
	void wheelEvent(QWheelEvent *e);

	virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);

private:
	Ogre3DEngine* ogreEngine;
};

#endif // OGREWIDGET_H
